// lazyload config

angular.module('app')
/**
 * jQuery plugin config use ui-jq directive , config the js and css files that required
 * key: function name of the jQuery plugin
 * value: array of the css js file located
 */
    .constant('JQ_CONFIG', {
            easyPieChart: [ISS.getResPath('vendor/jquery/charts/easypiechart/jquery.easy-pie-chart.js')],
            sparkline: [ISS.getResPath('vendor/jquery/charts/sparkline/jquery.sparkline.min.js')],
            slimScroll: [ISS.getResPath('vendor/jquery/slimscroll/jquery.slimscroll.min.js')],
            sortable: [ISS.getResPath('vendor/jquery/sortable/jquery.sortable.js')],
            filestyle: [ISS.getResPath('vendor/jquery/file/bootstrap-filestyle.min.js')],
            chosen: [ISS.getResPath('vendor/jquery/chosen/chosen.jquery.min.js'),
                ISS.getResPath('vendor/jquery/chosen/chosen.css')],
            dataTable: [ISS.getResPath('vendor/jquery/datatables/jquery.dataTables.min.js'),
                ISS.getResPath('vendor/jquery/datatables/dataTables.bootstrap.js'),
                ISS.getResPath('vendor/jquery/datatables/dataTables.bootstrap.css')],
            footable: [ISS.getResPath('vendor/jquery/footable/footable.all.min.js'),
                ISS.getResPath('vendor/jquery/footable/footable.core.css')],
            selectmenu: [],
            flexigrid: [ISS.getPath('/static/grid/css/flexigrid.css'),
                ISS.getPath('/static/grid/css/flexigrid2.css'),
                ISS.getPath('/static/grid/css/contextmenu.css'),
                ISS.getPath('/static/grid/js/jquery.form.js'),
                ISS.getPath('/static/grid/js/jquery-extend.js'),
                ISS.getPath('/static/grid/js/jquery.contextmenu.js'),
                ISS.getPath('/static/grid/js/jquery.flexigrid.js'),
                ISS.getPath('/static/common/js/json2.js')]
        }
    )
    // oclazyload config
    .config(['$ocLazyLoadProvider', function ($ocLazyLoadProvider) {
        // We configure ocLazyLoad to use the lib script.js as the async loader
        $ocLazyLoadProvider.config({
            debug: false,
            events: true,
            modules: [
                {
                    name: 'ngGrid',
                    files: [
                        ISS.getResPath('vendor/modules/ng-grid/ng-grid.min.js'),
                        ISS.getResPath('vendor/modules/ng-grid/ng-grid.min.css'),
                        ISS.getResPath('vendor/modules/ng-grid/theme.css')
                    ]
                },
                {
                    name: 'ui.select',
                    files: [
                        ISS.getResPath('vendor/modules/angular-ui-select/select.min.js'),
                        ISS.getResPath('vendor/modules/angular-ui-select/select.min.css')
                    ]
                },
                {
                    name: 'ngImgCrop',
                    files: [
                        ISS.getResPath('vendor/modules/ngImgCrop/ng-img-crop.js'),
                        // ISS.getResPath('vendor/modules/ngImgCrop/ng-img-crop.css')
                    ]
                },
                {
                    name: 'toaster',
                    files: [
                        ISS.getResPath('vendor/modules/angularjs-toaster/toaster.js'),
                        ISS.getResPath('vendor/modules/angularjs-toaster/toaster.css')
                    ]
                }, ,
                {
                    name: 'ui.calendar',
                    files: ['vendor/modules/angular-ui-calendar/calendar.js']
                }
            ]
        });
    }])
;